/* 
    需要权限的路由
*/
import Layout from '_c/layout/index'
const dynamicRoutes = [
  // 数据大屏管理模块
  {
    path: '/manage',
    component: Layout,
    meta: {
      title: '组件',
      icon: '',
    },
    children: [
      {
        path: 'page1',
        component: () => import('@/views/pages/page1.vue'),
        name: 'page1',
        meta: {
          title: '自适应的Echart',
          icon: '',
        },
      },
      {
        path: 'page2',
        component: () => import('@/views/pages/page2.vue'),
        name: 'page2',
        meta: {
          title: '函数式组件',
          icon: '',
        },
      },
      {
        path: 'page3',
        component: () => import('@/views/pages/page3.vue'),
        name: 'page3',
        meta: {
          title: '产品加工',
          icon: '',
        },
      },
      {
        path: 'page4',
        component: () => import('@/views/pages/page4.vue'),
        name: 'page4',
        meta: {
          title: '仓储管理',
          icon: '',
          code: 'SJDPGL_CCGL',
        },
      },
    ],
  },
  // 账号管理模块
  {
    path: '/account-management',
    component: Layout,
    name: 'account-management',
    meta: {
      title: '账号管理',
      icon: '',
      code: 'ZHGL',
    },
    children: [
      {
        path: 'userManagement',
        component: () => import('@/views/account-management/userManagement'),
        name: 'userManagement',
        meta: {
          title: '用户管理',
          icon: '',
          code: 'ZHGL_YHGL',
        },
      },
      {
        path: 'groupManagement',
        component: () => import('@/views/account-management/groupManagement'),
        name: 'groupManagement',
        meta: {
          title: '组织机构管理',
          icon: '',
          code: 'ZHGL_ZZJG',
        },
      },
      {
        path: 'roleManagement',
        component: () => import('@/views/account-management/roleManagement'),
        name: 'roleManagement',
        meta: {
          title: '角色权限管理',
          icon: '',
          code: 'ZHGL_JSQX',
        },
      },
    ],
  },
]
export default dynamicRoutes
